/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.pretorius.programs.program04.impl;

import za.ac.cput.pretorius.programs.program04.Factorial;

/**
 *
 * @author griddy
 */
public class FactorialImpl implements Factorial {

    @Override
    public int calcFactorial(int endValue) {
        
        int total = 1;
        
        for(int i = 0 ; i < endValue+1 ; i++)
        {
            if(i > 1)
                total *= i;
           
        }
        
        return total;
    }
    
}
